#ifndef __PVMHELPERAPI_H__
#define __PVMHELPERAPI_H__

/*
	Some helping functions:
*/

#include "pvm/pvmapi.h"

#if defined(__cplusplus)
class IPvmInStream;
extern "C"
{
#endif/*__cplusplus*/

/*
	Typedefs
*/
typedef void (PVMCALL *TFreeMemmoryProc)(void* memblock);

/*
	Search for driver by his name
*/
PVMAPI pvm_int PVMCALL PVMHFindDriverByShortNameWZ(const pvm_char* name);


PVMAPI IPVMReadCallbacks* PVMCALL PVMHCreateFileInputStreamCallbacks(const pvm_char* fileName);

#if defined(__cplusplus)
}
#endif/*__cplusplus*/

/*
	C++ functions
*/

#if defined(__cplusplus)

PVMAPI IPvmInStream* PVMCALL PVMHCreateMemoryInputStream(pvm_int8* dataPtr, pvm_size dataSize, pvm_bool ownMemory, TFreeMemmoryProc memFreeProc);
PVMAPI IPvmInStream* PVMCALL PVMHCreateFileInputStream(const pvm_char* fileName);

PVMAPI IPvmOutStream* PVMCALL PVMHCreateFileOutputStream(const pvm_char* fileName, pvm_bool truncateFile);

PVMAPI void PVMCALL PVMHCloseStream(IPvmBaseStream* stream);


#endif/*__cplusplus*/

#endif/*__PVMHELPERAPI_H__*/
